'''
自定义进程类
'''
from multiprocessing import Process
from time import sleep


class MyProcess(Process):
    def __init__(self, value=0):
        self.value = value
        super().__init__()

    def func(self):
        for i in range(self.value):
            sleep(2)
            print('阿西吧')

    def run(self) -> None:
        self.func()


if __name__ == '__main__':
    p = MyProcess(3)
    p.start()
